package com.study.spring.boot.jpa;

import com.study.spring.boot.model.Info;
import com.study.spring.boot.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.Description;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.data.rest.core.annotation.RestResource;

import java.util.List;


/**
 * @author xubangbang
 * @date 2021/7/30 18:57
 */
@RepositoryRestResource(path = "info", collectionResourceRel = "infoList")
public interface InfoJpa extends JpaRepository<Info, Long> {

    @RestResource(rel = "author", path = "author")
    List<Info> findByAuthor(@Param("author") String author);
}


